@massimo: pretty please use git :)
authorØyvind Kolås <pippin@gimp.org>
Fri, 8 Sep 2017 15:21:37 +0000 (17:21 +0200)
committerØyvind Kolås <pippin@gimp.org>
Fri, 8 Sep 2017 15:27:49 +0000 (17:27 +0200)
It would be really nice if others, and prolifix people like
you, prepared git formatted patches, so that it is much saner
and easier to push and work with contributions as a maintainer
with a dirty tree, and in even more valuable bugs than this
one.. without needing to re-read and re-understand the entire
context of the fix, before fully reimplementing it.

This commit fixes bug #787441, where NaN is polluting the
computer error/tolerance.

babl/babl-util.c

index 01a5e978a6211d0a6fa230e99e367ade23b567a4..7af13627d2443a625e5883ec0b359e6b41de5ad0 100644 (file)
@@ -91,7 +91,7 @@ babl_rel_avg_error (const double *imgA,
   for (i = 0; i < samples; i++)
     error += fabs (imgA[i] - imgB[i]);
 
-  if (error >= 0.000001)
+  if (!(error < 0.000001))
     error /= samples;
   else
     error = 0.0;